#define F_CPU 8000000UL
#include <avr/io.h>
#include <util/delay.h>

int main()
{
	DDRB = 0xFF;			//make PORTB output
	DDRD = 0xFF;			//make PORTD output
	
	//Configure Timer1
	//Clear on compare match
	//8 Prescale
	ICR1 = 255;
	TCCR1A |= (1<<COM1A1)|(1<<COM1B1)|(1<<WGM11);
	TCCR1B |= (1<<WGM13)|(1<<WGM12)|(1<<CS11);
	OCR1A = 26;
	OCR1B = 26;
		
	//Configure Timer0
	//Clear on compare match
	//8 prescale
	TCCR0A |= (1<<COM0A1)|(1<<WGM01)|(1<<WGM00);
	TCCR0B |= (1<<CS01);
	
	while(1)
	{
		for(int i=25;i<230;i+=1){
			OCR1A = i;
			_delay_us(1);
			for(int j=25;j<230;j+=1){
				OCR1B = j;
				_delay_us(1);
				for(int k=25;k<230;k+=1){
					OCR0A = k;
					_delay_us(1);
				}
			}
		}
	}
}